<?php

namespace app\common\validate;

use think\Validate;

class Goods extends Validate
{
    protected $rule = [
        'id'=>'require|gt:0|number',
        'content'=>'min:1|require',
        'category_id'=>'require|gt:0|number',
        'category_name'=>'min:1',
        'title'=>'require|min:1',
        'page'=>'require|gt:0|number',
        'limit'=>'require|gt:0|number',
    ];

    protected $scene = [
        'edit'  =>  ['id','content','category_id','category_name'],
        'list' =>['page','limit'],
        'detail' =>['id']
    ];

}
